home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Suzy B Software 2
/
Suzy B Software CD-ROM 2 (1994).iso
/
bootup
/
boot_n2z
/
play20
/
play.doc
< prev
next >
Wrap
Text File
|
1995-05-02
|
10KB
|
304 lines
QD Play
Version 2.0
By Dave Baggett
Copyright (C) 1990, 1991, 1992 by David M. Baggett
--------------------------------------------------------------------------------
User Contract
This program is FREE. You may distribute it at will, provided you
1) do not charge any money for it,
2) distribute it WITH the documentation, and
3) do not change the program or documentation in ANY WAY.
--------------------------------------------------------------------------------
Command Line Usage
------------------
This utility will play 8-bit sound samples. To call it from a
command shell (e.g. GULAM), type
play <pathname> <Hz>
where <pathname> is the name of the sample file, and <Hz> is the
playback frequency in Hertz. For example, type
play deadjim.snd 11000
and you will hear Bones and Captain Kirk. Note that the program
doesn't care how fast or slow you play the sample, so try
play deadjim.snd 18000
and
play deadjim.snd 7500
to see the effect of changing the playback speed.
AUTO Folder usage
-----------------
Isn't it *nifty* how those Mac people can make their computers play
digitized sounds when they boot up? Well, now you too can experience
the tremendous joy of hearing your machine make some obnoxious noise
when you turn it on. Here's how:
Put play.prg in your AUTO folder. Use autosort to make play.prg
the first thing to get called on bootup. You can do this by hand
by saving a copy of your AUTO programs, deleting your AUTO folder,
then copying the AUTO programs into a fresh AUTO folder in the
order in which you want the AUTO programs to be called. (For all
you programmer types: NO it's not a requirement that play.prg get
called first, it's just more Mac-ish that way.)
Then create a file called play.inf with a text editor containing
lines like
<pathname> <Hz>
<pathname> <Hz>
...
<pathname> <Hz>
where <pathname> is the the name of a sample file and <Hz> is the
playback speed in Hertz (just like with the command line invocation).
Put play.inf in your boot partition. (I.e., if your AUTO folder is
C:\AUTO, put play.inf in C:\)
Then REBOOT! (Make sure the volume's turned up so ya can hear it...)
Specifying an Alternate D/A Device (AUTO Folder)
------------------------------------------------
QD Play can be configured to play its samples through other D/A devices.
Currently, the Hippo/Navarone and ST Replay digitizers are supported. Other
digitizers will be supported if people send me info on them.
To use an alternate D/A device, put one of the following keywords
in curly brackets at the beginning or end of your play.inf file:
hippo replay ste dma
For example, a play.inf containing
{hippo}
d:\usr\sounds\zoinks.snd 8000
will cause QD Play to play the "zoinks" sound through the Hippo/Navarone
digitizer attached to your ST's cartidge port.
Type
play d:\usr\sounds\zoinks.snd 8000 -hippo
to get the same effect from the desktop or command line. The "ste" device
uses the STe's D/A 8-bit converter, but uses the MFP chip for the timing
so that samples can be played back at any sample rate (at some cost in
sound quality). The "dma" device uses standard STe DMA sound, but will
only play at one of the following rates:
6.25 kHz, 12.5 kHz, 25 kHz, 50 kHz
QD Play will choose the closest rate from the list above.
Specifying an Alternate D/A Device (Command Line)
-------------------------------------------------
The following options select the various supported playback devices:
-hippo: use Hippo digitizer
-replay: use ST Replay digitizer
-ste: use STe sound, using MFP for timing
-dma: use STe sound, using DMA for timing
All these except -replay can be abbreviated by their first letters. The
-replay switch can be minimally abbreviated to -re to distinguish it
from the -r (reverse) option.
Other Exciting Options
----------------------
The -q option will prevent QD Play from printing its cheerful greeting
message. For example,
play d:\usr\sounds\attack.snd 11000 -q
will play attack.snd without printing a blurb.
The -r option will cause QD Play to play the sound in reverse.
The -l option tells QD Play to loop the sample either 10 times or
until a key is pressed. CAVEAT: Do NOT try this with samples faster
than about 16 kHz using the ST speaker for playback. Beyond 16 kHz the
sample playing interrupts happen so often that they make the TOS keyboard
handler flakey, which often results in TOTAL SYSTEM LOCKUP. (And
lots of bombs and other cool stuff on the screen.)
The -2 option makes QD Play interpret the sample data as stereo, where
alternating bytes go to the left and right channels. Note that you can play
stereo sounds on any device, but on mono devices the two channels will be
mixed. This usually sounds bad if the stereo sample has panning effects.
The -z option tells QD Play to interpret the sample data as
signed magnitude instead of the standard (as far as I'm concerned
at least) unsigned magnitude. Some sample editors use signed and
others use unsigned -- it makes no difference in terms of sound
quality, but it's really annoying if you don't have a sample player
that supports both. If you play a sample and it sounds really noisy,
try the -z option -- you may have a signed magnitude sample on your hands.
Command Line Usage Examples
---------------------------
Since QD Play's many options can be a bit daunting at first, here
are some examples to get you started quickly:
play chord.110 11000
Plays chord.110 at 11000 hertz through the ST speaker, using
the MFP for timing.
play stereo.125 12500 -2 -d
Plays stereo.125 at 12500 hertz through the STe 8-bit D/A using DMA,
treating the data as stereo.
play stereo.125 10000 -2 -d
Same effect as above. If you don't pick one of the STe DMA device's
four preset playback rates, QD Play will pick the closest one for you.
play stereo.125 10000 -2 -s
Unlike the example above, this command will actually play the
stereo sound at 10000 hertz, not 12500, since the -s option tells QD Play
to use the STe 8-bit D/A but to use the MFP for timing. Sound quality
is not as good with this method, but unlike the -d option (DMA sound device
timing) it offers playback at all sample rates.
play signed.080 8000 -z -re
Plays signed.080 at 8000 hertz through the ST Replay digitizer,
treating the data as signed magnitude.
play stereo.125 8000 -2
Plays stereo.125 at 8000 hertz through the ST speaker. The data
is interpreted as stereo, but the two channels are mixed to produce
mono data suitable for the ST speaker (since the ST speaker can't
play stereo sounds).
play deadjim.110 11000 -q -l -hippo
Loops deadjim.110 at 11000 hertz either 10 times or until a
key is pressed. No greeting message is printed, and the Hippo/Navaron
digitizer is used as the output device.
play rooster.080 8000 -r -re
Plays rooster.080 at 8000 hertz in reverse through the ST Replay
digitizer. Note that the -replay option can't be abbreviated to -r
because -r means "play the sample in reverse."
play chord.110 22000 -l
If run on an unaccelerated ST, locks up your machine. 22000 hertz is
too fast for a looped sample on an unmodified ST. Keep looped samples
down below 16 kHz to be safe.
Miscellaneous Info About Samples and the ST
-------------------------------------------
A sanity-preserving convention I've come up with after dealing with
literally thousands of samples is to store the sample rate in the filename
extension. E.g.,
filename.110 -> 11.0 kHz -> 11000 Hz
filaname.123 -> 12.3 kHz -> 12300 Hz
filename.062 -> 6.2 kHz -> 6200 Hz
It helps a lot, since sample speed is not normally encoded in the samples
themselves. (Sample editing programs usually have their own sample format,
but the most compatbile format is still the raw data.)
Most stereo samples for the STe will be in signed magnitude format,
since is what the device expects. This means you'll have to use the
-z option to play STe samples created with most other programs. It
also means that most STe sound players won't play sounds that are
in the standard unsigned format.
Most Mac samples are recored at either 11000 Hz or 22000 Hz. These
two sample rates are very popular because they're approximately one quarter
and one half the standard rate used on compact discs.
Most ST samples are recored at one of the following speeds:
0 - 4.9 kHz
1 - 7.68 kHz
2 - 9.6 kHz
3 - 14.99 kHz
4 - 19.8 kHz
5 - 30.7 kHz
Samples converted from SparcStations will be 8kHz samples.
History
-------
In version 1.0, playback speed was limited to 18kHz. In version
1.1, the limit is about 21kHz. Most 22kHz samples sound OK when
played at 21kHz.
A bug in the sample loading routine has been corrected. I was
passing a bad argument to calloc. Who knows why it worked before,
but it's fixed now.
Also, calling play.ttp with only one argument caused a bus error.
That's been fixed.
Low sample playback speeds are now handled correctly. Playback
speeds as low as 600Hz work now.
As of version 1.25, there was a 25 sample limit. That limit has
been raised to 250 in version 1.3.
Version 1.4 saw the addition of the -r option to play samples
in reverse.
Versions 1.5 and 1.6 were only distributed to people who registered
Digital Keyclick. (If you haven't, please do!)
Version 1.7 saw the addition of the -replay option to play samples
through an ST Replay digitizer.
Version 2.0 was the first to include support for STe's enhanced
sound capabilities. Other options were added, too, including
looping and signed magnitude sample support.
Dave Baggett
5640 Vantage Point Road
Columbia, MD 21044 USA
Internet: dmb@tis.com or dmb@wam.umd.edu
v1.0 April 6, 1990
v1.1 April 29, 1990
v1.25 May 17, 1990
v1.3 July 11, 1990
v1.4 August 5, 1990
v1.7 July 23, 1991
v2.0 March 15, 1992